<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8" />
  <title>06_点名一秒后加</title>
  <!-- 引入Vue -->
  <script type="text/javascript" src="../js//vue.js"></script>
</head>

<body>
  <!-- 准备好一个容器-->
  <div id="demo">
    姓:<input type="text" v-model="Fname"><br>
    名:<input type="text" v-model="Lname"><br>
    全名:
  </div>
</body>

<script type="text/javascript">
  new Vue({
    el: '#demo',
    data: {
      Fname: 'zhang',
      Lname: 'san',
    },
    watch: {
      Fname() {
        this.Fname + ' - ' + this.Lname;
      },
      Lname() {
        this.Lname
      }
    }
  })
</script>

</html>